package com.itheima.day13.Zuoye.Zuoye1;

public class sendliwu extends Thread{
    private Gift x;
    private int y;

    public Gift getX() {
        return x;
    }

    public void setX(Gift x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public sendliwu(String name, Gift x, int y) {
        super(name);
        this.x = x;
        this.y = y;
    }

    public sendliwu(String name, Gift x) {
        super(name);
        this.x = x;
    }

    @Override
    public void run() {
        this.y++;
        x.send();
    }
}
